<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Function Book</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />
<link rel="stylesheet" href="css/jqx.base.css" type="text/css" />

<link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />

<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-aller.js"></script>
<script type="text/javascript" src="js/gettheme.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.lightbox_me.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/coin-slider.min.js"></script>
<script type="text/javascript" src="js/jqxcore.js"></script>
<script type="text/javascript" src="js/jqxmenu.js"></script>
<script type="text/javascript">
            $(document).ready(function () {
                var theme = getTheme();
                // Create a jqxMenu
                $("#jqxMenu").jqxMenu({ width: '130', mode: 'vertical', theme: theme });
                $("#jqxMenu").css('visibility', 'visible');
            });
        </script>
		<script type="text/javascript">
			$(document).ready(function(){
				$('#try-1').click(function(e) {
				$('#sign_up').lightbox_me({
					centered: true, 
					onLoad: function() { 
						$('#sign_up').find('input:first').focus()
						}
					});
					e.preventDefault();
				});

				$('#try-2').click(function(e) {
				$('#sign_up').lightbox_me({
					centered: true, 
					onLoad: function() { 
						$('#sign_up').find('input:first').focus()
						}
					});
					e.preventDefault();
				});

				$('#try-3').click(function(e) {
				$('#sign_up').lightbox_me({
					centered: true, 
					onLoad: function() { 
						$('#sign_up').find('input:first').focus()
						}
					});
					e.preventDefault();
				});
			});
			function getFunctionHallDetails(areaId){
				window.location.href="displayFunctionHallDetails.php?areaId="+areaId;
			}
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$('#one').ContentSlider({
					width : '900px',
					height : '400px',
					speed : 800,
					easing : 'easeInOutBack'
				});
		});
		</script>
		<style>
		.group1_available {
			background: none repeat scroll 0 0 green;
			border: 3px double #CDCDCD;
			border-radius: 5px 5px 5px 5px;
			float: left;
			margin-bottom: 10px;
			margin-left:30px;
			padding: 15px;
			position: relative;
			width: 150px;
		}
		.group1_booked {
			background: none repeat scroll 0 0 red;
			border: 3px double #CDCDCD;
			border-radius: 5px 5px 5px 5px;
			float: left;
			margin-bottom: 10px;
			margin-left:30px;
			padding: 15px;
			position: relative;
			width: 150px;
		}
	</style>
</head>
<body>
<div class="main">
  <div class="header">
    <div class="header_resize">
      <div class="menu_nav">
        <ul>
          <li class="active"><a href="index.php"><span>Home Page</span></a></li>
          <li><a href="#"><span>Support</span></a></li>
          <li><a href="#"><span>About Us</span></a></li>
          <li><a href="#"><span>Blog</span></a></li>
          <li><a href="contact.php"><span>Contact Us</span></a></li>
        </ul>
      </div>
	  <?php
		//Connects to your Database 
	 $db_host = 'localhost';
	 $db_user = 'function';
	 $db_pwd = 'w9ak4X1l0Y';

	 $database = 'function_a5110060';
	 $con = mysql_connect($db_host, $db_user, $db_pwd);				
	  ?>
      <div class="logo">
		<table>
			<tr>
				<td><img src="custom_images/logo.jpg" width="100" height="100" alt="Function Hall" /></td>
				<td><h1><a href="index.html" style=><small>your bookings made easy</small> <span style="font-size:44px;font-style:verdana">Function Book</span></a></h1></td>
			</tr>
		</table>
      </div>
      <div class="clr"></div>
      <div class="slider">
        <div id="coin-slider"> <a href="#"><img src="images/header-latitude.jpg" width="915" height="350" alt="" /> </a> <a href="#"><img src="images/images.jpg" width="283" height="178" alt="" /> </a> <a href="#"><img src="images/goa-banquet-halls.jpg" width="944" height="236" alt="" /> </a><a href="#"><img src="images/gloria_banquet_hall.jpg" width="695" height="431" alt="" /> </a><a href="#"><img src="images/header-latitude.jpg" width="915" height="350" alt="" /> </a> <a href="#"><img src="images/functionhall2.jpg" width="915" height="350" alt="" /> </a> <a href="#"><img src="images/functionhall3.jpg" width="915" height="350" alt="" /> </a> <a href="#"><img src="images/functionhall4.jpg" width="915" height="350" alt="" /> </a> </div>
      </div>
	  <marquee behavior="scroll" direction="left" onmouseover="this.stop()" onmouseout="this.start()">
		<a href="index.php"><img src="custom_images/functionhall.jpeg" width="200" height="100" alt="Function Hall"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="cardDistribution.php"><img src="custom_images/wedding_card.jpg" width="200" height="100" alt="card distribution"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="catering.html"><img src="custom_images/Catering/catering.jpeg" width="200" height="100" alt="Catering"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="catering.html"><img src="custom_images/flowerDecorations/flowerDecorations.jpeg" width="200" height="100" alt="Flower Decorations"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="catering.html"><img src="custom_images/purohit/purohit.jpeg" width="200" height="100" alt="Purohits"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="catering.html"><img src="custom_images/supplier/supplier.jpeg" width="200" height="100" alt="Suppliers"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#"><img src="custom_images/dj.jpg" width="200" height="100" alt="Flying Bat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#"><img src="custom_images/beautyParlour.jpg" width="200" height="100" alt="Flying Bat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#"><img src="custom_images/photograph.jpg" width="200" height="100" alt="Flying Bat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#"><img src="custom_images/shopping.jpg" width="200" height="100" alt="Flying Bat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#"><img src="custom_images/Tent_and_Suppliers.jpg" width="200" height="100" alt="Flying Bat" /></a>
	</marquee>
      <div class="clr"></div>
    </div>
  </div>

  <div class="content">
    <div class="content_resize">
      <div class="mainbar">
        <div class="article">
          <h2><span>Excellent Solution</span> For Your Business</h2>
		  <p>We build an excellent solution for bringing the people of andhra pradesh and oweners of function halls close to each other.<br>Please select a function hall and check for the specification if u are satisfied please drop us a mail in <b><a href="contact.php">contact us menu</a></b>we will get back with the required information with in 6 hrs of the mail<b><br>
		  </p><p>Our Mission:Deliver the best function hall Accourding to your needs</b><br></p>
		  <p><b>Our Vision:</b>connect people to all the function halls available in AP</p><br>
		  <p>Contact us by call: Raju and Ramesh.&nbsp;&nbsp;&nbsp;&nbsp;Telephone: 88-8553-8554,&nbsp;&nbsp;&nbsp;&nbsp;E-mail: function@functionbook.in 
          <div class="clr"></div>
        </div>
        
		
      </div>
      <div class="sidebar">
        <div class="clr"></div>
        <div class="gadget">
          <h2 class="star"><span>All</span> Locations</h2>
          <div class="clr"></div>
		  <div id='jqxWidget' style='width: 110px;'>
            <div id='jqxMenu' style="visibility: hidden;">
                <ul>
                    <li><a href="#">Home</a></li>
                    <?php
						$location = array();
						$subLocation = array();
						$area = array();
						mysql_select_db($database,$con) or die(mysql_error());
						
						$result = mysql_query("SELECT t1.master_location_id, t1.master_location_name, GROUP_CONCAT( DISTINCT CONCAT( CAST( t2.sub_location_id AS CHAR ) , '#', t2.sub_location_name ) ) sub_location_names, GROUP_CONCAT( DISTINCT CONCAT( CAST( t2.sub_location_id AS CHAR ) , '*', CAST( t3.area_id AS CHAR ) , '#', t3.area_name ) ) area_names FROM Location_Master t1 LEFT JOIN ( Sub_Location_Master t2 ) ON ( t2.master_location_id = t1.master_location_id  )  left join Sub_location_Area t3  on (t3.master_location_id = t1.master_location_id AND t2.sub_location_id = t3.sub_location_id) GROUP BY t1.master_location_id LIMIT 0 , 30") or die(mysql_error());
						
						$num_rows = mysql_num_rows($result);
						while($arrayResult = mysql_fetch_array($result)){
							print "<li>";
							echo 'Towards '.$arrayResult['master_location_name'];
								$sub_location_names_array = $arrayResult['sub_location_names'];
								if($sub_location_names_array!=''){	
									$sub_location_names = explode(',',$sub_location_names_array);
									
									print "<ul>";
									for($i=0;$i<sizeof($sub_location_names);$i++){
										 $sub_location_name = explode('#',$sub_location_names[$i]);
										 for($j = 0 ; $j<sizeof($sub_location_name) ; $j++){
											echo "<li>";
												$sub_location_id = $sub_location_name[$j++];  
												echo $sub_location_name[$j]; 
												$area_names_array = $arrayResult['area_names'];
												if($area_names_array!=''){
													print "<ul>";
													 $sub_loc_names_array = explode(',',$area_names_array);	
													 for($k = 0;$k<sizeof($sub_loc_names_array);$k++){
														$pos = strpos($sub_loc_names_array[$k], $sub_location_id.'*');
														if ($pos !== false) {
															$area_id = substr($sub_loc_names_array[$k],strpos($sub_loc_names_array[$k], '*')+1,(strpos($sub_loc_names_array[$k], '#')-strpos($sub_loc_names_array[$k], '*'))-1);
															$area_name = substr($sub_loc_names_array[$k],strpos($sub_loc_names_array[$k], '#')+1);
															echo "<li id=$area_id onclick='getFunctionHallDetails(this.id)'>";
																echo $area_name;
															echo "</li>";
														} 
														
													 }
													 
													print "</ul>";
												}
											echo "</li>";
										 }
									}
									print "</ul>";
								}
							print "</li>";
						}
						
						print "<li>";
						$temp = 0; 
						print "</li>"
						?>
                </ul>
            </div>
        </div>
        </div>
        <div class="gadget">
          <h2 class="star"><span>Sponsors</span></h2>
          <div class="clr"></div>
         
        </div>
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="fbg">
    <div class="fbg_resize">
      <div class="col c1">
        <h2><span>Hall</span> Gallery</h2>
        </div>
      
      <div class="col c3">
        <h2><span>Contact</span> Us</h2>
        <p>Raju and Ramesh.</p>
        <p class="contact_info"> <span>Address:</span> East Maredpalli<br />
          <span>Telephone:</span> 88-8553-8554<br />
          <span>E-mail:</span> <a href="#">function@functionbook.in</a> </p>
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="footer">
    <div class="footer_resize">
      <p class="lf">&copy; Copyright <a href="#">SparkConsultancyServices</a>.</p>
      <p class="rf">Design by SparkConsultancyServices</a></p>
      <div style="clear:both;"></div>
    </div>
  </div>
</div>
</body>
</html>
